/* @(#)DecKanGlDictionaryActivity.java
** 
** Copyright (C) 2012 by Steven D. Stamps
**
**             Trademarks & Copyrights
** Flywheel Management Science(TM), Flywheel Management Model(TM),
** Flywheel Story Editor(TM) and FlywheelMS(TM) are exclusive trademarks
** of Steven D. Stamps and may only be used freely for the purpose of
** identifying the unforked version of this software.  Subsequent forks
** may not use these trademarks.  All other rights are reserved.
**
** DecKanGL (Decorated Kanban Glyph Language) and TribKn (Tribal Knowledge)
** are also exclusive trademarks of Steven D. Stamps.  These may be used
** freely within the unforked FlywheelMS application and documentation.
** All other rights are reserved.
**
** gConGUI (game Controller Graphical User Interface) is an exclusive
** trademark of Steven D. Stamps.  This trademark may be used freely
** within the unforked FlywheelMS application and documentation.
** All other rights are reserved.
**
** Trademark information is available at
** <http://www.flywheelms.com/trademarks>
**
** Flywheel Management Science(TM) is a copyrighted body of management
** metaphors, governance processes, and leadership techniques that is
** owned by Steven D. Stamps.  These copyrighted materials may be freely
** used, without alteration, by the community (users and developers)
** surrounding this GPL3-licensed software.  Additional copyright
** information is available at <http://www.flywheelms.org/copyrights>
**
**              GPL3 Software License
** This program is free software: you can use it, redistribute it and/or
** modify it under the terms of the GNU General Public License, version 3,
** as published by the Free Software Foundation. This program is distributed
** in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
** even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
** PURPOSE.  See the GNU General Public License for more details. You should
** have received a copy of the GNU General Public License, in a file named
** COPYING, along with this program.  If you cannot find your copy, see
** <http://www.gnu.org/licenses/gpl-3.0.html>.
*/
package com.flywheelms.library.fms.activity;

import java.util.Arrays;
import java.util.HashMap;

import android.app.Activity;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;

import com.flywheelms.library.R;
import com.flywheelms.library.deckangl.enumerator.DecoratorCanvasLocation;
import com.flywheelms.library.deckangl.enumerator.GlyphScale;
import com.flywheelms.library.deckangl.enumerator.GlyphZoomSize;
import com.flywheelms.library.deckangl.enumerator.WorkStateColor;
import com.flywheelms.library.deckangl.glyph.DecKanGlGlyph;
import com.flywheelms.library.deckangl.glyph.NounDefinition;
import com.flywheelms.library.deckangl.interfaces.DecKanGlDecorator;
import com.flywheelms.library.deckangl.interfaces.DecKanGlNoun;
import com.flywheelms.library.fmm.deckangl.DecoratorChildFractals;
import com.flywheelms.library.fmm.deckangl.DecoratorCompletion;
import com.flywheelms.library.fmm.deckangl.DecoratorFacilitationIssue;
import com.flywheelms.library.fmm.deckangl.DecoratorFacilitator;
import com.flywheelms.library.fmm.deckangl.DecoratorFlywheelCommitment;
import com.flywheelms.library.fmm.deckangl.DecoratorGovernance;
import com.flywheelms.library.fmm.deckangl.DecoratorParentFractals;
import com.flywheelms.library.fmm.deckangl.DecoratorStory;
import com.flywheelms.library.fmm.deckangl.DecoratorStrategicCommitment;
import com.flywheelms.library.fmm.deckangl.DecoratorWorkTaskBudget;
import com.flywheelms.library.fmm.deckangl.DecoratorWorkTeam;
import com.flywheelms.library.fmm.deckangl.FmmDecKanGlDictionary;
import com.flywheelms.library.fmm.node.impl.enumerator.CompletableWorkState;
import com.flywheelms.library.gcg.helper.GuiHelper;
import com.flywheelms.library.gcg.helper.GcgSpinnerHelper;

public class DecKanGlDictionaryActivity extends Activity implements DecKanGlNoun {
	
	private DecKanGlGlyph decKanGlGlyph;
	private OnItemSelectedListener sharedSpinnerListener = new SharedSpinnerListener();
	private int NUMBER_OF_INITIALIZED_SPINNERS = 14;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.deckangl_dictionary_activity);
		initializeSpinners();
		initializeDecKanGlImageView();
		getActionBar().setDisplayHomeAsUpEnabled(true);  // Show the Up button in the action bar.
	}
	
	private void initializeDecKanGlImageView() {
		updateDecKanGlImageView(getUpdatedDecKanGlGlyph());
		ImageView theImageView = (ImageView) this.findViewById(R.id.deckangl_glyph__image_view);
		theImageView.setOnClickListener(new View.OnClickListener() {
			
	        @Override
	           public void onClick(View view) {
	            incrementImageView();
	            }
	        });
	}
	
	private void incrementImageView() {
		GlyphScale theGlyphScale = getGlyphScale();
		switch(theGlyphScale) {
			case NORMAL:
				setGlyphScale(GlyphScale.ZOOM);
				break;
			case ZOOM:
				setGlyphScale(GlyphScale.ANNOTATED);
				break;
			case ANNOTATED:
				setGlyphScale(GlyphScale.NORMAL);
				break;
			default:
				// TODO - throw a nasty exception about bad programmers!  ;-)
		}
		updateDecKanGlImageView(getUpdatedDecKanGlGlyph());
	}

	private void setGlyphScale(GlyphScale theGlyphScale) {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.deckangl_glyph__scale__spinner);
		@SuppressWarnings("unchecked")
		ArrayAdapter<GlyphScale> theArrayAdapter = (ArrayAdapter<GlyphScale>) theSpinner.getAdapter();
		int theSpinnerPosition = theArrayAdapter.getPosition(theGlyphScale);
		theSpinner.setSelection(theSpinnerPosition);
	}

	private void updateDecKanGlImageView(DecKanGlGlyph aDecKanGlGlyph) {
		GlyphScale theGlyphScale = getGlyphScale();
		ImageView theImageView = (ImageView) this.findViewById(R.id.deckangl_glyph__image_view);
		BitmapDrawable theBitmapDrawable;
		if(theGlyphScale == GlyphScale.NORMAL) {
			theBitmapDrawable = aDecKanGlGlyph.getDecoratedNounBitmapDrawable();
		} else if(theGlyphScale == GlyphScale.ZOOM) {
			theBitmapDrawable = aDecKanGlGlyph.getDecoratedNounBitmapDrawableZoom(GlyphZoomSize.MEDIUM);
		} else {
			theBitmapDrawable = aDecKanGlGlyph.getAnnotatedBitmapDrawable(GlyphZoomSize.MEDIUM);
		}
		GuiHelper.updateScaledImageViewInTableRow(theImageView, theBitmapDrawable);
		updateNodeQualityView();
	}

	private void updateNodeQualityView() {
		TextView theIntegerView = (TextView) this.findViewById(R.id.deckangl_noun__node_quality__data);
		GuiHelper.updateIntegerView(theIntegerView, getDecKanGlGlyph().getNodeQualityIndex());
	}

	private void initializeSpinners() {
		/* 
		 * must be initialized in the order in which they are defined in the layout.xml
		 */
		// Noun Status
		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.deckangl_noun__label,
				R.id.deckangl_noun__spinner,
				R.string.language_element__noun__completable,
				R.drawable.work_breakdown,
				FmmDecKanGlDictionary.getInstance().getCompletableNounCollection(),
				FmmDecKanGlDictionary.getInstance().getCompletableNoun(FmmDecKanGlDictionary.noun_PROJECT_ASSET),
				30 );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.deckangl_noun__spinner,
				this.sharedSpinnerListener);
		
		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.deckangl_noun__work_state__label,
				R.id.deckangl_noun__work_state__spinner,
				CompletableWorkState.getStaticInstance(),
				CompletableWorkState.values(),
				CompletableWorkState.NOT_STARTED,
				30 );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.deckangl_noun__work_state__spinner,
				this.sharedSpinnerListener);
		
		// DecKanGL Glyph
		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.deckangl_glyph__scale__label,
				R.id.deckangl_glyph__scale__spinner,
				R.string.deckangl__glyph_scale,
				R.drawable.null_drawable,
				Arrays.asList(GlyphScale.values()) );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.deckangl_glyph__scale__spinner,
				this.sharedSpinnerListener);
		
		// TribKn Decorators
//		DecoratorChildFractals
		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.tribkn_quality_metric__governance__label,
				R.id.tribkn_quality_metric__governance__spinner,
				DecoratorGovernance.getStaticInstance(),
				DecoratorGovernance.values(),
				DecoratorGovernance.NO_GOVERNANCE );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.tribkn_quality_metric__governance__spinner,
				this.sharedSpinnerListener );

		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.tribkn_quality_metric__facilitation_issue__label,
				R.id.tribkn_quality_metric__facilitation_issue__spinner,
				DecoratorFacilitationIssue.getStaticInstance(),
				DecoratorFacilitationIssue.values(),
				DecoratorFacilitationIssue.NO_FACILITATION_ISSUE );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.tribkn_quality_metric__facilitation_issue__spinner,
				this.sharedSpinnerListener );

		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.tribkn_quality_metric__facilitator__label,
				R.id.tribkn_quality_metric__facilitator__spinner,
				DecoratorFacilitator.getStaticInstance(),
				DecoratorFacilitator.values(),
				DecoratorFacilitator.PROPOSED_FACILITATOR );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.tribkn_quality_metric__facilitator__spinner,
				this.sharedSpinnerListener );

		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.tribkn_quality_metric__story__label,
				R.id.tribkn_quality_metric__story__spinner,
				DecoratorStory.getStaticInstance(),
				DecoratorStory.values(),
				DecoratorStory.STORY_SWAG );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.tribkn_quality_metric__story__spinner,
				this.sharedSpinnerListener );

		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.tribkn_quality_metric__completion__label,
				R.id.tribkn_quality_metric__completion__spinner,
				DecoratorCompletion.getStaticInstance(),
				DecoratorCompletion.values(),
				DecoratorCompletion.COMPLETION_NOT_SCHEDULED );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.tribkn_quality_metric__completion__spinner,
				this.sharedSpinnerListener );
		
		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.tribkn_quality_metric__child_fractals__label,
				R.id.tribkn_quality_metric__child_fractals__spinner,
				DecoratorChildFractals.getStaticInstance(),
				DecoratorChildFractals.values(),
				DecoratorChildFractals.CHILD_FRACTALS_SWAG );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.tribkn_quality_metric__child_fractals__spinner,
				this.sharedSpinnerListener );

		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.tribkn_quality_metric__parent_fractals__label,
				R.id.tribkn_quality_metric__parent_fractals__spinner,
				DecoratorParentFractals.getStaticInstance(),
				DecoratorParentFractals.values(),
				DecoratorParentFractals.PARENT_FRACTALS_SWAG );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.tribkn_quality_metric__parent_fractals__spinner,
				this.sharedSpinnerListener );

		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.tribkn_quality_metric__strategic_commitment__label,
				R.id.tribkn_quality_metric__strategic_commitment__spinner,
				DecoratorStrategicCommitment.getStaticInstance(),
				DecoratorStrategicCommitment.values(),
				DecoratorStrategicCommitment.NO_COMMITMENT );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.tribkn_quality_metric__strategic_commitment__spinner,
				this.sharedSpinnerListener );

		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.tribkn_quality_metric__flywheel_commitment__label,
				R.id.tribkn_quality_metric__flywheel_commitment__spinner,
				DecoratorFlywheelCommitment.getStaticInstance(),
				DecoratorFlywheelCommitment.values(),
				DecoratorFlywheelCommitment.NO_COMMITMENT );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.tribkn_quality_metric__flywheel_commitment__spinner,
				this.sharedSpinnerListener );

		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.tribkn_quality_metric__work_task_budget__label,
				R.id.tribkn_quality_metric__work_task_budget__spinner,
				DecoratorWorkTaskBudget.getStaticInstance(),
				DecoratorWorkTaskBudget.values(),
				DecoratorWorkTaskBudget.TASK_BUDGET_SWAG );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.tribkn_quality_metric__work_task_budget__spinner,
				this.sharedSpinnerListener );

		GcgSpinnerHelper.initializeGuiableSpinner(
				this,
				R.id.tribkn_quality_metric__work_team__label,
				R.id.tribkn_quality_metric__work_team__spinner,
				DecoratorWorkTeam.getStaticInstance(),
				DecoratorWorkTeam.values(),
				DecoratorWorkTeam.WORK_TEAM_SWAG );
		GcgSpinnerHelper.setOnItemSelectedListener(
				this,
				R.id.tribkn_quality_metric__work_team__spinner,
				this.sharedSpinnerListener );
	}
	
//	spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
	class SharedSpinnerListener implements OnItemSelectedListener {
		
    	Toast toast;
    	int eventOnItemSelectedCounter = 0;
		
	    @Override
	    public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {
	    	++this.eventOnItemSelectedCounter;
	    	if(this.eventOnItemSelectedCounter > DecKanGlDictionaryActivity.this.NUMBER_OF_INITIALIZED_SPINNERS) {
	    		updateDecKanGlImageView(getUpdatedDecKanGlGlyph());
//		    	toast = Toast.makeText(DecKanGlDictionaryActivity.this,
//		     			"Item selected at position: " + position, Toast.LENGTH_LONG);
//		    	toast.show();
	    	}
	    }

	    @Override
	    public void onNothingSelected(AdapterView<?> parentView) {
		    	this.toast = Toast.makeText(DecKanGlDictionaryActivity.this,
			     			"Nothing selected", Toast.LENGTH_LONG);
		     	this.toast.show();
	    }

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
//		getMenuInflater().inflate(R.menu.deckangl_dictionary_activity, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem aMenuItem) {
		switch (aMenuItem.getItemId()) {
		case android.R.id.home:
			// This ID represents the Home or Up button. In the case of this
			// activity, the Up button is shown. Use NavUtils to allow users
			// to navigate up one level in the application structure. For
			// more details, see the Navigation pattern on Android Design:
			//
			// http://developer.android.com/design/patterns/navigation.html#up-vs-back
			//
			NavUtils.navigateUpFromSameTask(this);
			return true;
		default:
			break;
		}
		return super.onOptionsItemSelected(aMenuItem);
	}
	
	////////  Other Spinner getters  /////////

	@Override
	public NounDefinition getNounDefinition() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.deckangl_noun__spinner);
		return (NounDefinition) theSpinner.getSelectedItem();
	}
	
	public CompletableWorkState getCompletableWorkState() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.deckangl_noun__work_state__spinner);
		return (CompletableWorkState) theSpinner.getSelectedItem();
	}
	
	private GlyphScale getGlyphScale() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.deckangl_glyph__scale__spinner);
		return (GlyphScale) theSpinner.getSelectedItem();
	}
	
	////////  Decorator "getters"  //////////
	
	private DecoratorGovernance getDecoratorGovernance() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.tribkn_quality_metric__governance__spinner);
		return (DecoratorGovernance) theSpinner.getSelectedItem();
	}
	
	private DecoratorFacilitationIssue getDecoratorFacilitationIssue() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.tribkn_quality_metric__facilitation_issue__spinner);
		return (DecoratorFacilitationIssue) theSpinner.getSelectedItem();
	}
	
	private DecoratorFacilitator getDecoratorFacilitator() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.tribkn_quality_metric__facilitator__spinner);
		return (DecoratorFacilitator) theSpinner.getSelectedItem();
	}
	
	private DecoratorParentFractals getDecoratorParentFractals() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.tribkn_quality_metric__parent_fractals__spinner);
		return (DecoratorParentFractals) theSpinner.getSelectedItem();
	}
	
	private DecoratorChildFractals getDecoratorChildFractals() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.tribkn_quality_metric__child_fractals__spinner);
		return (DecoratorChildFractals) theSpinner.getSelectedItem();
	}
	
	private DecoratorStrategicCommitment getDecoratorStrategicCommitment() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.tribkn_quality_metric__strategic_commitment__spinner);
		return (DecoratorStrategicCommitment) theSpinner.getSelectedItem();
	}
	
	private DecoratorFlywheelCommitment getDecoratorFlywheelCommitment() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.tribkn_quality_metric__flywheel_commitment__spinner);
		return (DecoratorFlywheelCommitment) theSpinner.getSelectedItem();
	}
	
	private DecoratorWorkTaskBudget getDecoratorWorkTaskBudget() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.tribkn_quality_metric__work_task_budget__spinner);
		return (DecoratorWorkTaskBudget) theSpinner.getSelectedItem();
	}
	
	private DecoratorWorkTeam getDecoratorWorkTeam() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.tribkn_quality_metric__work_team__spinner);
		return (DecoratorWorkTeam) theSpinner.getSelectedItem();
	}
	
	private DecoratorStory getDecoratorStory() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.tribkn_quality_metric__story__spinner);
		return (DecoratorStory) theSpinner.getSelectedItem();
	}
	
	private DecoratorCompletion getDecoratorCompletion() {
		Spinner theSpinner = (Spinner) this.findViewById(R.id.tribkn_quality_metric__completion__spinner);
		return (DecoratorCompletion) theSpinner.getSelectedItem();
	}
	
	////////  DecKanGlNoun interface  //////////

	@Override
	public WorkStateColor getDecKanGlWorkStateColor() {
		return getCompletableWorkState().getWorkStateColor();
	}

	@Override
	public HashMap<DecoratorCanvasLocation, DecKanGlDecorator> getDecKanGlDecoratorMap() {
		HashMap<DecoratorCanvasLocation, DecKanGlDecorator> decKanGlDecoratorMap =
				new HashMap<DecoratorCanvasLocation, DecKanGlDecorator>();
		decKanGlDecoratorMap.put(
				FmmDecKanGlDictionary.getInstance().getTribKn(FmmDecKanGlDictionary.tribKn_GOVERNANCE).getLogicalCanvasLocation(),
				getDecoratorGovernance() );
		decKanGlDecoratorMap.put(
				FmmDecKanGlDictionary.getInstance().getTribKn(FmmDecKanGlDictionary.tribKn_FACILITATION_ISSUE).getLogicalCanvasLocation(),
				getDecoratorFacilitationIssue() );
		decKanGlDecoratorMap.put(
				FmmDecKanGlDictionary.getInstance().getTribKn(FmmDecKanGlDictionary.tribKn_FACILITATOR).getLogicalCanvasLocation(),
				getDecoratorFacilitator() );
		decKanGlDecoratorMap.put(
				FmmDecKanGlDictionary.getInstance().getTribKn(FmmDecKanGlDictionary.tribKn_PARENT_FRACTALS).getLogicalCanvasLocation(),
				getDecoratorParentFractals() );
		decKanGlDecoratorMap.put(
				FmmDecKanGlDictionary.getInstance().getTribKn(FmmDecKanGlDictionary.tribKn_CHILD_FRACTALS).getLogicalCanvasLocation(),
				getDecoratorChildFractals() );
		decKanGlDecoratorMap.put(
				FmmDecKanGlDictionary.getInstance().getTribKn(FmmDecKanGlDictionary.tribKn_STRATEGIC_COMMITMENT).getLogicalCanvasLocation(),
				getDecoratorStrategicCommitment() );
		decKanGlDecoratorMap.put(
				FmmDecKanGlDictionary.getInstance().getTribKn(FmmDecKanGlDictionary.tribKn_FLYWHEEL_COMMITMENT).getLogicalCanvasLocation(),
				getDecoratorFlywheelCommitment() );
		decKanGlDecoratorMap.put(
				FmmDecKanGlDictionary.getInstance().getTribKn(FmmDecKanGlDictionary.tribKn_WORK_TASK_BUDGET).getLogicalCanvasLocation(),
				getDecoratorWorkTaskBudget() );
		decKanGlDecoratorMap.put(
				FmmDecKanGlDictionary.getInstance().getTribKn(FmmDecKanGlDictionary.tribKn_WORK_TEAM).getLogicalCanvasLocation(),
				getDecoratorWorkTeam() );
		decKanGlDecoratorMap.put(
				FmmDecKanGlDictionary.getInstance().getTribKn(FmmDecKanGlDictionary.tribKn_STORY).getLogicalCanvasLocation(),
				getDecoratorStory() );
		decKanGlDecoratorMap.put(
				FmmDecKanGlDictionary.getInstance().getTribKn(FmmDecKanGlDictionary.tribKn_COMPLETION).getLogicalCanvasLocation(),
				getDecoratorCompletion() );
		return decKanGlDecoratorMap;
	}

	@Override
	public String getDecKanGlNounName() {
		return getNounDefinition().getName();
	}

	@Override
	public DecKanGlGlyph getDecKanGlGlyph() {
		if(this.decKanGlGlyph == null) {
			updateDecKanGlGlyph();
		}
		return this.decKanGlGlyph;
	}

	@Override
	public void updateDecKanGlGlyph() {
		this.decKanGlGlyph = FmmDecKanGlDictionary.getInstance().getDecKanGlGlyph(this);
	}

	@Override
	public DecKanGlGlyph getUpdatedDecKanGlGlyph() {
		updateDecKanGlGlyph();
		return this.decKanGlGlyph;
	}

}
